<%--
  Created by IntelliJ IDEA.
  User: 蒋丽娟
  Date: 2019/5/21
  Time: 20:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<c:set var="path" value="${pageContext.request.contextPath}"></c:set>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <title>首页</title>


    <link href="${path}/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css"/>
    <link href="${path}/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css"/>

    <link href="${path}/basic/css/demo.css" rel="stylesheet" type="text/css"/>

    <link href="${path}/css/hmstyle.css" rel="stylesheet" type="text/css"/>
    <link href="${path}/css/skin.css" rel="stylesheet" type="text/css"/>
    <script src="${path}/AmazeUI-2.4.2/assets/js/jquery.min.js"></script>
    <script src="${path}/AmazeUI-2.4.2/assets/js/amazeui.min.js"></script>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
</head>

<body>
<div class="hmtop">
    <!--顶部导航条 -->
    <jsp:include page="header.jsp"></jsp:include>
</div>
<div class="banner">
    <!--轮播 -->
    <div class="am-slider am-slider-default scoll" data-am-flexslider id="demo-slider-0">
        <ul class="am-slides">
            <li class="banner11"><img src="${path}/images/timg.jpg"/></li>
            <li class="banner21"><img src="${path}/images/timg2.jpg"/></li>
            <li class="banner31"><img src="${path}/images/timg3.jpg"/></li>
            <li class="banner41"><img src="${path}/images/ad4.jpg"/></li>

        </ul>
    </div>
    <div class="clear"></div>
</div>
<div class="shopNav">
    <div class="slideall">

        <div class="long-title"><span class="all-goods">全部分类</span></div>
        <jsp:include page="navigation.jsp"></jsp:include>

        <!--侧边导航 -->
        <div id="nav" class="navfull">
            <div class="area clearfix">
                <div class="category-content" id="guide_2">
                    <div class="category">
                        <ul class="category-list" id="js_climit_li">
                            <c:forEach items="${listOne}" var="one">
                                <li class="appliance js_toggle relative first">
                                    <div class="category-info">
                                        <h3 class="category-name b-category-name"><i><img src="${path}/images/cake.png"></i><a
                                                class="ml-22" title="点心">${one.onelevelname}</a></h3>
                                        <em>&gt;</em></div>
                                    <div class="menu-item menu-in top">
                                        <div class="area-in">
                                            <div class="area-bg">
                                                <div class="menu-srot">
                                                    <div class="sort-side">
                                                        <c:forEach items="${listTwo}" var="two">
                                                            <c:if test="${one.onelevelid==two.onelevelid}">
                                                                <dl class="dl-sort">
                                                                    <dd class=""><a
                                                                            title=""><span>${two.twolevelname}</span></a>
                                                                    </dd>
                                                                    <dd class="productDisplay"
                                                                        style="display:none">${two.twolevelid}</dd>
                                                                </dl>
                                                            </c:if>
                                                        </c:forEach>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <b class="arrow"></b>
                                </li>
                            </c:forEach>
                        </ul>
                    </div>
                </div>
            </div>
        </div>

        <!--轮播-->

        <script type="text/javascript">
            (function () {
                $('.am-slider').flexslider();
            });
            $(document).ready(function () {
                $("li").hover(function () {
                    $(".category-content .category-list li.first .menu-in").css("display", "none");
                    $(".category-content .category-list li.first").removeClass("hover");
                    $(this).addClass("hover");
                    $(this).children("div.menu-in").css("display", "block")
                }, function () {
                    $(this).removeClass("hover")
                    $(this).children("div.menu-in").css("display", "none")
                });

                $(".dl-sort").each(function () {
                    $(this).click(function () {
                        var twolevelid = $(this).children(".productDisplay").text();
                        console.log(twolevelid);
                        window.location.href = "productDisplay?twolevelid=" + twolevelid;
                    });
                });
            })
        </script>


        <div class="clear"></div>
    </div>
    <script type="text/javascript">
        if ($(window).width() < 640) {
            function autoScroll(obj) {
                $(obj).find("ul").animate({
                    marginTop: "-39px"
                }, 500, function () {
                    $(this).css({
                        marginTop: "0px"
                    }).find("li:first").appendTo(this);
                })
            }

            $(function () {
                setInterval('autoScroll(".demo")', 3000);
            })
        }
    </script>
</div>
<div class="shopMainbg">
    <div class="shopMain" id="shopmain">
        <div class="clear "></div>
        <!--热门活动 -->

        <div class="am-container activity ">
            <div class="shopTitle ">
                <h4 id="listProduct2">面包</h4>
                <h3> </h3>
                <span class="more ">
                              <a href="productDisplay?twolevelid=2">相关商品<i class="am-icon-angle-right" style="padding-left:10px ;"></i></a>
                        </span>
            </div>
            <div class="am-g am-g-fixed ">

                <c:forEach items="${listProduct2}" var="e1">
                <a href="tointroduction?goodsid=${e1.goodsid}"><div class="am-u-sm-3 ">
                    <div class="activityMain ">
                        <img src="${e1.pictureurl} "></img>
                    </div>
                </div>
                </a>
                </c:forEach>
            </div>
        </div>
        <div class="am-container activity ">
            <div class="shopTitle ">
                <h4 id="listProduct5">饼干</h4>
                <h3> </h3>
                <span class="more ">
                              <a href="productDisplay?twolevelid=5">相关商品<i class="am-icon-angle-right" style="padding-left:10px ;"></i></a>
                        </span>
            </div>
            <div class="am-g am-g-fixed ">

                <c:forEach items="${listProduct5}" var="e1">
                    <a href="tointroduction?goodsid=${e1.goodsid}"><div class="am-u-sm-3 ">
                        <div class="activityMain ">
                            <img src="${e1.pictureurl} "></img>
                        </div>
                    </div>
                    </a>
                </c:forEach>

            </div>
        </div>
        <div class="am-container activity ">
            <div class="shopTitle ">
                <h4 id="listProduct8">肉片干</h4>
                <h3> </h3>
                <span class="more ">
                              <a href="productDisplay?twolevelid=8">相关商品<i class="am-icon-angle-right" style="padding-left:10px ;"></i></a>
                        </span>
            </div>
            <div class="am-g am-g-fixed ">
                <c:forEach items="${listProduct8}" var="e1">
                    <a href="tointroduction?goodsid=${e1.goodsid}"><div class="am-u-sm-3 ">
                        <div class="activityMain ">
                            <img src="${e1.pictureurl} "></img>
                        </div>
                    </div>
                    </a>
                </c:forEach>
            </div>
        </div>

        <div class="clear "></div>


        <div class="footer ">

            <div class="footer-bd">
                <p>
                    <em>Copyright © 2006-2019 YONGHUI SUPERSTORES, All Rights Reserved小馋猫超市·版权所有 中国福建省厦门市软园24号
                        客服中心：86-591-83758880 4000601933</em>
                </p>
            </div>
        </div>
    </div>

</div>
</div>
<!--引导 -->
<div class="navCir">
    <li class="active"><a href="home.html"><i class="am-icon-home "></i>首页</a></li>
    <li><a href="sort.html"><i class="am-icon-list"></i>分类</a></li>
    <li><a href="user.action/toShopCart"><i class="am-icon-shopping-basket"></i>购物车</a></li>
    <li><a href="person/index.html"><i class="am-icon-user"></i>我的</a></li>
</div>


<!--菜单 -->
<%--<div>
    <div id="sidebar">
        <div id="wrap">
            <div id="prof" class="item ">
                <a href="# ">
                    <span class="setting "></span>
                </a>
                <div class="ibar_login_box status_login ">
                    <div class="avatar_box ">
                        <p class="avatar_imgbox "><img src="${path}/images/no-img_mid_.jpg "/></p>
                        <ul class="user_info ">
                            <li>用户名sl1903</li>
                            <li>级&nbsp;别普通会员</li>
                        </ul>
                    </div>
                    <div class="login_btnbox ">
                        <a href="order.html" class="login_order ">我的订单</a>
                        <a href="collection.html" class="login_favorite ">我的收藏</a>
                    </div>
                    <i class="icon_arrow_white "></i>
                </div>

            </div>
            <div id="shopCart " class="item ">
                <a href="user.action/toShopCart">
                    <span class="message "></span>
                </a>
                <p>
                    购物车
                </p>
                <p class="cart_num ">0</p>
            </div>
            <div id="asset " class="item ">
                <a href="# ">
                    <span class="view "></span>
                </a>
                <div class="mp_tooltip ">
                    我的资产
                    <i class="icon_arrow_right_black "></i>
                </div>
            </div>

            <div id="foot " class="item ">
                <a href="foot.html ">
                    <span class="zuji "></span>
                </a>
                <div class="mp_tooltip ">
                    我的足迹
                    <i class="icon_arrow_right_black "></i>
                </div>
            </div>

            <div id="brand " class="item ">
                <a href="collection.html">
                    <span class="wdsc "><img src="${path}/images/wdsc.png "/></span>
                </a>
                <div class="mp_tooltip ">
                    我的收藏
                    <i class="icon_arrow_right_black "></i>
                </div>
            </div>

            <div id="broadcast " class="item ">
                <a href="# ">
                    <span class="chongzhi "><img src="${path}/images/chongzhi.png "/></span>
                </a>
                <div class="mp_tooltip ">
                    我要充值
                    <i class="icon_arrow_right_black "></i>
                </div>
            </div>

            <div class="quick_toggle ">
                <li class="qtitem " >

                  <div class="mp_tooltip ">客服中心<i class="icon_arrow_right_black"></i></div>
                    <a  target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=1403672737&site=qq&menu=yes"><span class="kfzx"></span></a>
                </li>
                <!--二维码 -->
                <li class="qtitem ">
                    <a href="#none "><span class="mpbtn_qrcode "></span></a>
                    <div class="mp_qrcode " style="display:none; "><img src="${path}/images/weixin_code_145.png "/><i
                            class="icon_arrow_white "></i></div>
                </li>
                <li class="qtitem ">
                    <a href="#top " class="return_top "><span class="top "></span></a>
                </li>
            </div>

            <!--回到顶部 -->
            <div id="quick_links_pop " class="quick_links_pop hide "></div>

        </div>

    </div>
    <div id="prof-content " class="nav-content ">
        <div class="nav-con-close ">
            <i class="am-icon-angle-right am-icon-fw "></i>
        </div>
        <div>
            我
        </div>
    </div>
    <div id="shopCart-content " class="nav-content ">
        <div class="nav-con-close ">
            <i class="am-icon-angle-right am-icon-fw "></i>
        </div>
        <div>
            购物车
        </div>
    </div>
    <div id="asset-content " class="nav-content ">
        <div class="nav-con-close ">
            <i class="am-icon-angle-right am-icon-fw "></i>
        </div>
        <div>
            资产
        </div>

        <div class="ia-head-list ">
            <a href="# " target="_blank " class="pl ">
                <div class="num ">0</div>
                <div class="text ">优惠券</div>
            </a>
            <a href="# " target="_blank " class="pl ">
                <div class="num ">0</div>
                <div class="text ">红包</div>
            </a>
            <a href="# " target="_blank " class="pl money ">
                <div class="num ">￥0</div>
                <div class="text ">余额</div>
            </a>
        </div>

    </div>
    <div id="foot-content " class="nav-content ">
        <div class="nav-con-close ">
            <i class="am-icon-angle-right am-icon-fw "></i>
        </div>
        <div>
            足迹
        </div>
    </div>
    <div id="brand-content " class="nav-content ">
        <div class="nav-con-close ">
            <i class="am-icon-angle-right am-icon-fw "></i>
        </div>
        <div>
            收藏
        </div>
    </div>
    <div id="broadcast-content " class="nav-content ">
        <div class="nav-con-close ">
            <i class="am-icon-angle-right am-icon-fw "></i>
        </div>
        <div>
            充值
        </div>
    </div>
</div>--%>
<script>
    window.jQuery || document.write('<script src="${path}/basic/js/jquery.min.js "><\/script>');
</script>
<script type="text/javascript " src="${path}/basic/js/quick_links.js "></script>

</body>

</html>
